﻿@model List<ProjectDeal.Models.LoaiDeal>
@{Layout = null;}
   

@section header{
  
}

<div id="top2">
            	<ul class="myaccountmenu">
                    @if (User.Identity.IsAuthenticated)
                    {
                        <li><a href="/KhachHang/DangKi" style="height: 40px; padding-top: 10px;">Xin chào @Membership.GetUser().UserName</a></li>
                    }
                    else
                    {
                        <li><a href="/KhachHang/DangKi" style="height: 40px; padding-top: 10px;">Đăng Kí</a></li>
                    }
                    <li><a href="/Deal/DetailDeal" style="height: 40px; padding-top: 10px;">DetailDeal</a></li>
                    <li><a href="/CheckOut/CheckOut" style="height: 40px; padding-top: 10px;">Cart</a></li>
                    <li><a href="/KhachHang/InfoContact" style="height: 40px; padding-top: 10px;">info</a></li>
                    @if (User.Identity.IsAuthenticated)
                    {
                        <li>@Html.ActionLink("Đăng xuất", "Loggout", "KhachHang","", new { style = "height: 40px; padding-top: 10px;" })</li>
                    }
                    else
                    {
                         <li class="login"><a href="#login-box" class="last login-window" style="height: 40px; padding-top: 10px;">Đăng nhập</a></li>
                    }
                   
                </ul>
				
                <form action="#" method="post" class="search_bar">
                    <fieldset>
                      <input type="text" name="search" class="search" value="Enter a keywords..." onBlur="if (this.value == ''){this.value = 'Enter a keywords...'; }" onFocus="if (this.value== 'Enter a keywords...') {this.value = ''; }" />
                      <input type="submit" name="submit" value="Search" class="submit" />
                    </fieldset>
                </form>
                <div id="login-box" class="login-popup">
                <a href="/Home/Index" class="close"><img src="@Url.Content("~/Content/images/process-stop.png")"   class="btn_close" title="Close Window" alt="Close" /></a>
                  <form id="LoginPopup" method="post" onsubmit="return UserLogin(this)" class="signin">
                        <fieldset class="textbox">
                        <label class="username">
                        <span>Email</span>
                         @Html.TextBox("username", "", new { @placeholder = "Email đăng nhập" })
                        </label>
                        <label class="password">
                        <span>Mật khẩu</span>
                         @Html.Password("password", "", new { @placeholder = "Mật khẩu" })
                        </label>
                        <button class="submit button" onsubmit="return UserLogin(this)" type="submit">Đăng nhập</button>
                        <p>
                        @Html.ActionLink("Quên mật khẩu?","QuenMatKhau","KhachHang",null,new{@class="forgot",@style="float: left;margin-top: 7px;width: 107px;"})    
                              @Html.ActionLink("Đăng ký","DangKi","KhachHang",null,new{@class="register",@style="float: left;margin-top: 7px;"})
                            <img id="loader" style="display:none; float: right;margin-right: 14px;width: 27px;" src="@Url.Content("~/Content/images/ajax-loader.gif")" />
                        </p>    
                          @Html.ActionLink("LoginFB", "FacebookLogin", "KhachHang", new {@Url=@Request.Url.AbsoluteUri }, null)  
                        
                        </fieldset>
                 </form>
       			</div>
                
            </div><!--end:top2-->
            <div id="top3">
			 <ul id="mega-menu-3" class="mega-menu" >
			 <li style="border-bottom-left-radius: 8px"><img src="@Url.Content("~/Content/images/logodeal.png")" alt="" style="margin-top: 15px;margin-left: 15px;margin-bottom: 13px;margin-right: 5px;"></li>
                   @foreach (var item in Model)
                   {
                       
                        <li class="first"><a href="@Url.Action("DealTheoLoai","Deal", new { ShortName = @item.ShortName,page=1 })" class="current" style="border-right: 2px #fff">@item.TenLoaiDeal</a>
                        <ul>
                            @using (ProjectDeal.Models.db_Kayleehouse db = new ProjectDeal.Models.db_Kayleehouse())
                            {
                                foreach (var dieukienList in (from b in db.LoaiDeals
                                                              where b.MaLoaiDealCha == item.MaLoaiDeal
                                                              select b).ToList())
                                {
                    	                            <li><a href="@Url.Action("DealTheoLoai","Deal", new { MaLoaiDeal = @item.MaLoaiDeal,page=1 })">@dieukienList.TenLoaiDeal</a></li>
                                       
                                }
                            }
                        </ul>
                        </li>
                    
               }
                </ul>
           
			</div>